package com.chunxiadong.mapper;

import com.chunxiadong.entity.Blog;
import com.chunxiadong.entity.BlogBySearch;
import com.chunxiadong.entity.RecommendBlog;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @auther QiuShangcheng
 * @create 2021/6/7
 */
@Mapper
@Repository
public interface BlogMapper {

    int addBlog(Blog blog);

    List<Blog> getAllBlog();

    List<Blog> getAllBlogToArchive();

    List<Blog> getAllBlogToAdmin();

    Blog getBlog(Integer id);

    List<Blog> getBlogByTypeAndTitle(BlogBySearch blog);

    int updateBlog(Blog blog);

    List<RecommendBlog> getRecommendBlog(RecommendBlog blog);

    int IncreaseViews(Integer id);

    int deleteBlogById(Integer id);

}
